﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Nirvana
{
    public static class Vector3Tool
    {

        public static Vector3 Lerp(Vector3 v1, Vector3 v2, Vector3 v3, float t)
        {
            t = Mathf.Clamp01(t);
            float num = 1f - t;
            return num * num * v1 + 2f * num * t * v2 + t * t * v3;
        }


        public static Vector3 Dot(Vector3 v1, Vector3 v2, Vector3 v3, float t)
        {
            return 2f * (1f - t) * (v2 - v1) + 2f * t * (v3 - v2);
        }
        public static Vector3 Lerp(Vector3 A_0, Vector3 A_1, Vector3 A_2, Vector3 A_3, float A_4)
        {
            A_4 = Mathf.Clamp01(A_4);
            float num = 1f - A_4;
            return num * num * num * A_0 + 3f * num * num * A_4 * A_1 + 3f * num * A_4 * A_4 * A_2 + A_4 * A_4 * A_4 * A_3;
        }

        public static Vector3 Dot(Vector3 A_0, Vector3 A_1, Vector3 A_2, Vector3 A_3, float A_4)
        {
            A_4 = Mathf.Clamp01(A_4);
            float num = 1f - A_4;
            return 3f * num * num * (A_1 - A_0) + 6f * num * A_4 * (A_2 - A_1) + 3f * A_4 * A_4 * (A_3 - A_2);
        }

    }
}

